class Animal {
    public String name;
    public int age;

    public void eat() {
        System.out.println(name+" 正在吃饭！");
    }
}
class Dog extends Animal {
    public void wangwang() {
        System.out.println(name+"正在叫！");
    }
}
class Cat extends Animal {
    public void miaomiao() {
        System.out.println(name+"正在喵喵叫！");
    }
}
public class Test3 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "坦克";
        dog.eat();
        dog.wangwang();

        Cat cat = new Cat();
        cat.name = "小咪";
        cat.eat();
        cat.miaomiao();
    }
}
